define(["jquery"],function($){

    //判断非空 为空返回true
    var is_empty = function(obj){
        if (obj != null && obj !== 0 && obj !== '') {
            return false;
        }
        if (obj == undefined
            || obj == null
            || obj == '') {
            return true;
        }
    };
    var String_format = function(str){
        if (str == null || str.length == 0) {
            return "";
        }

        if (str.indexOf('%s') == -1) {
            return str;
        }

        var arr = str.split('%s');

        if (arr.length > arguments.length) {
            throw 'The number of actual parameters more than number of placeholders!';
        }

        var args = [];
        var str = arr[0];
        for (var arg in arguments) {
            if (arg == 0) {
                continue;
            }
            str += arguments[arg] + arr[arg];
        }

        return str;
    };

    return {
        is_empty:is_empty,
        String_format:String_format
    }
});